<?php

namespace app\model;

use app\BaseModel;
use think\model\relation\BelongsTo;
use app\model\not_del\UserModel as NotDelUserModel;

/**
 * 干预措施（危机上报）
 */
class CrisisMeasuresModel extends BaseModel
{
    protected $name = 'crisis_measures';

    /**
     * 关联用户表
     * @return BelongsTo
     */
    public function user(): BelongsTo
    {
        return $this->belongsTo(NotDelUserModel::class,'uid')->bind([
            'user_name' => 'name',
            'role_name'
        ]);
    }
}